<div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">请填写普通用户登录信息</h4>
                </div>
                <div class="modal-body">
                    <form name="fm" method="post" action="./doLogin.php" onsubmit="return check()"
                    class="form-horizontal">
                    <input type="hidden" name="vid" id="videoid" >
                    <div class="form-group">
                        <label for="exampleInputUserName1" class="col-md-2 control-label">用户名</label>
                        <div class="col-md-4">
                            <input type="text" name="username" class="form-control" id="exampleInputUserName1" placeholder="姓名" required>
                        </div>
                        <div class="col-md-6">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1" class="col-md-2 control-label">密码</label>
                        <div class="col-md-4">
                            <input type="password" name="pswd" class="form-control" id="exampleInputPassword1" placeholder="密码" required>
                        </div>
                        <div class="col-md-6">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <input type="submit" class="btn btn-default" value="登录">
                            <input type="reset" class="btn btn-default" value="重置">
                        </div>
                    </div>
                    <?php
                    if(isset($_GET["msg"])){
                        echo'<h1 style="color:red;">'.$_GET["msg"]."</h1>";
                    }
                    ?>
                    <?php
                    if(isset($_GET["msg9"])){
                        echo'<h1 style="color:red;">'.$_GET["msg9"]."</h1>";
                    }
                    ?>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" onclick="location.replace('index.php')"
                data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="reg" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-lable="close"> <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="reg"> 注册个人信息</h4>         
            </div>     
            <div class="modal-body">
                <form action="douserReg.php" method="POST" enctype="multipart/form-data" class="form-horizontal">
                    <div class="form-group">
                        <label for="exampleInputUserName" class="col-md-4 control-label">姓名</label>
                        <div class="col-md-4">
                            <input type="text" name="username" class="form-control" id="exampleInputUserName" placeholder="name" required>
                        </div>
                        <div class="col-md-4">                    
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="exampleAge" class="col-md-4 control-label">年龄</label>
                        <div class="col-md-4">
                            <input type="number" name="age" id="exampleAge" class="form-control"
                            placeholder="age" required="">
                        <div class="col-md-4">                 
                        </div>        
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="examplePassword" class="col-md-4 control-label">密码</label>
                        <div class="col-md-4">
                            <input type="password" name="password" id="examplePassword" placeholder="password" required="">
                        <div class="col-md-4">                 
                        </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-4 control-label">性别</label>
                        <div class="col-md-4">
                          <label calss ="radio-inline"> 
                              <input type="radio" name="sex" value=0 checked>男
                          </label>
                          <label calss ="radio-inline"> 
                              <input type="radio" name="sex" value=1 checked>女
                          </label>
                      </div>
                  </div>
                  <div class="from-group">
                     <label class="col-md-4 control-label">爱好</label>
                     <div class="col-md-8">
                         <label calss ="checkbox-inline">
                             <input type="checkbox" name="hobby[]" value="旅游">旅游
                         </label>
                         <label calss ="checkbox-inline">
                            <input type="checkbox" name="hobby[]" value="登山">登山
                        </label>
                        <label calss ="checkbox-inline">
                            <input type="checkbox" name="hobby[]" value="健身">健身
                        </label>
                        <label calss ="checkbox-inline">
                            <input type="checkbox" name="hobby[]" value="上网">上网
                        </label>
                        <label calss ="checkbox-inline">
                            <input type="checkbox" name="hobby[]" value="游泳">游泳
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-4 control-label">学历</label>
                    <div class="col-md-4">
                       <select class="form-control" name="degree">
                         <option value="">请选择</option>
                         <option value="0">高中</option>
                         <option value="1">大学</option>
                         <option value="2">研究生</option>
                         <option value="3">博士生</option>
                       </select>
                    </div>
               </div>
               <div class="form-group">
                   <label for="exampleInputTextareal1" class="col-md-4 control-label">自我介绍</label>
                   <div class="col-md-4">
                       <textarea class="form-control" class="form-group-addon" rows="3" id="exampleInputTextareal1" palceholder="自我介绍" name="intro"></textarea>
                   </div>
               </div>
              <div class="form-group">
                   <label for="exampleInputFile" class="col-md-4 control-label">头像</label>
                   <div class="col-md-4">
                  <input type="file" name="pic" id="exampleInputFile" required>
                  </div>
              </div>
              <div class="form-group">
                  <div class="col-sm-offset-4 col-sm-4">
                     <input type="submit" class="btn btn-defalut" value="提交">
                     <input type="reset" class="btn btn-defalut" value="重置">
                 </div>
              </div>
          </form>
        </div>
        <div class="modal-footer">
                <button type="button" class="btn btn-default" onclick="location.replace('index.php')"
                data-dismiss="modal">关闭</button>
        </div>
     </div>
  </div>
</div>

<div class="modal fade" id="changePassword" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="changePassword">修改个人密码</h4>
            </div>
            <div class="modal-body">
                <form name="fm" method="post" action="doChangePassword.php" onsubmit="return
                check()" class="form-horizontal">
                <div class="form-group">
                    <label for="exampleInputPassword1" class="col-md-4 control-label">原密码</label>
                    <div class="col-md-4">
                        <input type="password" name="old" class="form-control" id="exampleInputPassword1"
                        placeholder="原密码" required>
                    </div>
                    <div class="col-md-4">
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleInputPassword1" class="col-md-4 control-label">新密码</label>
                    <div class="col-md-4">
                        <input type="password" name="new1" class="form-control" id="exampleInputPassword1"
                        placeholder="新密码" required>
                    </div>
                    <div class="col-md-4">
                    </div>
                </div>
                <div class="form-group">
                    <label for="exampleInputPassword1" class="col-md-4 control-label">确认新密码
                    </label>
                    <div class="col-md-4">
                        <input type="password" name="new2" class="form-control" id="exampleInputPassword1"
                        placeholder="确认新密码" required>
                    </div>
                    <div class="col-md-4">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <input type="submit" class="btn btn-default" value="修改">
                        <input type="reset" class="btn btn-default" value="重置">
                    </div>
                </div>
                <?php
                if(isset($_GET["msg3"])){
                    echo'<h1 style="color:red;">'.$_GET["msg3"]."</h1>";
                }
                ?>
                <?php
                if(isset($_GET["msg4"])){
                    echo'<h1 style="color:red;">'.$_GET["msg4"]."</h1>";
                }
                ?>
                <?php
                if(isset($_GET["msg5"])){
                    echo'<h1 style="color:red;">'.$_GET["msg5"]."</h1>";
                }
                ?>
            </form>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" onclick="location.replace('index.php')"
            data-dismiss="modal">关闭</button>
        </div>
    </div>
</div>
</div>

<div class="modal fade" id="changeInfor" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="changeInfor">修改个人信息</h4>
            </div>
            <div class="modal-body">
                <?php 
                require_once("./system/dbConn.php");
                connect();
                session_start();
                $uname=$_SESSION["user"];
                $sql="select * from users where uname='$uname'";
                $result= mysql_query($sql) or die("查询失败！".mysql_error());
                $row=mysql_fetch_assoc($result);
                $id=$row['uid'];
                $gender=$row['gender'];
                $birthdate=$row['birthdate'];
                $hobby=$row['hobby'];
                $degree=$row['degree'];
                $intro=$row['intro'];
                $pic=$row['pic'];
                ?>
                <form method="post"  onsubmit="return check()" name="fm" class="form-horizontal" action="douserReg.php">
                    <input type="hidden" name="id" value=<?php  echo $id;  ?>>
                    <div class="form-group">
                        <label for="username" class="col-md-2 control-label">用户名</label>
                        <div class="col-md-10">
                         <input type="text" class="form-control" id="username" readonly="readonly" name="uname" value= "<?php  echo $uname;  ?>" >
                     </div>
                 </div>
                 <div class="form-group">
                    <label  class="col-md-2 control-label">性别</label>
                    <div class="col-md-10">
                      <label class="radio-inline">
                       <input type="radio"  name="gender" value="0" <?php  if(!$gender) echo 'checked';  ?>>男</label>
                       <label class="radio-inline">
                           <input type="radio"  name="gender" value="1" <?php  if($gender) echo 'checked';  ?>>女</label>
                       </div>
                   </div>

                   <div class="form-group">
                    <label  class="col-md-2 control-label">生日</label>
                    <div class="col-md-10">
                        <input type="date" name="birthdate" class="form-control"  value='<?php  echo $birthdate;  ?>'>
                    </div>
                </div>

                <div class="form-group">
                    <label  class="col-md-2 control-label">爱好</label>
                    <div class="col-md-10">
                       <label class="checkbox-inline">
                         <input type="checkbox" name="hobby[]" value="旅游" <?php  if(strstr($hobby,'旅游')) echo 'checked';  ?>>旅游
                     </label>
                     <label class="checkbox-inline">
                         <input type="checkbox" name="hobby[]" value="登山" <?php  if(strstr($hobby,'登山')) echo 'checked';  ?>>登山
                     </label>
                     <label class="checkbox-inline">
                      <input type="checkbox" name="hobby[]" value="健身" <?php  if(strstr($hobby,'健身')) echo 'checked';  ?>>健身
                  </label>
                  <label class="checkbox-inline">
                      <input type="checkbox" name="hobby[]" value="上网" <?php  if(strstr($hobby,'上网')) echo 'checked';  ?>>上网
                  </label>
                  <label class="checkbox-inline">
                      <input type="checkbox" name="hobby[]" value="游泳" <?php  if(strstr($hobby,'游泳')) echo 'checked';  ?>>游泳
                  </label>
              </div>
          </div>

          <div class="form-group">
            <label  class="col-md-2 control-label">学历</label>
            <div class="col-md-10">    
               <select name="degree">
                  <option value="0">---请选择---</option>
                  <option value="1" <?php  if($degree=='1') echo 'selected';  ?>>高中</option>
                  <option value="2" <?php  if($degree=='2') echo 'selected';  ?>>大学</option>
                  <option value="3" <?php  if($degree=='3') echo 'selected';  ?>>研究生</option>
                  <option value="4" <?php  if($degree=='4') echo 'selected';  ?>>博士生</option>
              </select>
          </div>
      </div>

      <div class="form-group">
        <label  class="col-md-2 control-label">自我介绍</label>
        <div class="col-md-10">    
            <textarea name="intro" class="form-control" cols="40" rows="5"><?php  echo $intro;  ?></textarea>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-md-2 control-label">头像</label>
        <div class="col-md-10">    
           <input type="file" name="pic">
           原头像：<img src="./images/<?php echo $row["pic"]; ?>" width="80px" height="80px" class="img-circle">
       </div>
   </div>
   <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
        <input type="submit"  class="btn btn-default" value="更新">
    </div>
</div>
</form>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-default" onclick="location.replace('index.php')"
    data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
<?php
if(isset($_GET["msg3"])){
    echo'<h1 style="color:red;">'.$_GET["msg3"]."</h1>";
}
?>
<?php
if(isset($_GET["msg4"])){
    echo'<h1 style="color:red;">'.$_GET["msg4"]."</h1>";
}
?>
<?php
if(isset($_GET["msg5"])){
    echo'<h1 style="color:red;">'.$_GET["msg5"]."</h1>";
}
?>